-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Number
instead of Real
for mgf
and cf
#1504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Unfortunately, there are a bunch of type stability issues. They exist already in the current implementation so it's probably beyond the scope of this PR to fix all them. I think we should just make sure to not introduce any new issues and possibly fix some simple cases where changes are needed anyway (but then we should also test them to make sure we don't reintroduce them accidentally...).
Thanks for the monster review! I tried to address your comments and integrate them. The inference tests should tell us where things go wrong :) |
MGF are not necessarily defined on the whole Real/Complex domain, what should be returned when getting a value out of bound? NaN or ArgumentError ? |
I was wondering the same. I'm a bit unsure, do you have a concrete example? Then it might be easier to see. |
Codecov Report
@@ Coverage Diff @@
## master #1504 +/- ##
==========================================
+ Coverage 84.92% 84.97% +0.04%
==========================================
Files 128 128
Lines 7735 7765 +30
==========================================
+ Hits 6569 6598 +29
- Misses 1166 1167 +1
Continue to review full report at Codecov.
|
This has gone very very stale so I will just close it. |
As pointed out in #1502 ,
mgf
andcf
should be allowed to takeComplex
numbers and the second argument should be therefore relaxed.All functions are also made type-stable.
Breaking?, when the argument for the
mgf
is given outside of the domain definition aDomainError
is thrown.